//
//  PayWayTableViewCell.m
//  FaceTo
//
//  Created by 程邦明 on 2017/8/8.
//  Copyright © 2017年 chengbangming. All rights reserved.
//

#import "PayWayTableViewCell.h"

@implementation PayWayTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self initUI];
    }
    return self;
}
- (void)initUI{
    _headIamge = [[UIImageView alloc]init];
    [self addSubview:_headIamge];
    
    _nameLabel = [[UILabel alloc]init];
    _nameLabel.font = [UIFont systemFontOfSize:14];
    _nameLabel.textColor = Color(86, 86, 86);
    _nameLabel.textAlignment = NSTextAlignmentLeft;
    [self addSubview:_nameLabel];
    
    _clickBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [_clickBtn setImage:[UIImage imageNamed:@"shopqueding"] forState:UIControlStateNormal];
    [self addSubview:_clickBtn];
    
    [_headIamge mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.offset(10);
        make.centerY.equalTo(self.mas_centerY);
        make.width.mas_equalTo(30);
        make.height.mas_equalTo(30);
    }];
    
    [_nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(_headIamge.mas_right).with.offset(10);
        make.centerY.equalTo(self.mas_centerY);
        make.height.mas_equalTo(15);
    }];
    
    [_clickBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.offset(-10);
        make.centerY.equalTo(self.mas_centerY);
        make.height.mas_equalTo(20);
        make.width.mas_equalTo(20);
    }];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
